a-tuoheng-device/src/main/java/com/ruoyi/device/service/convert/DockDTOConvert.java

57 lines
1.1 KiB
Java
Raw Normal View History

2026-01-16 19:38:06 +08:00
package com.ruoyi.device.service.convert;
2026-01-21 11:14:31 +08:00
import com.ruoyi.common.core.utils.BaseConvert;
2026-01-16 19:38:06 +08:00
import com.ruoyi.device.domain.model.Dock;
import com.ruoyi.device.service.dto.DockDTO;
import java.util.List;
/**
* 机场Service层转换器
2026-01-20 16:09:06 +08:00
* Service DTO Domain Model
2026-01-16 19:38:06 +08:00
*
* @author ruoyi
* @date 2026-01-16
*/
2026-01-21 13:18:33 +08:00
public class DockDTOConvert extends BaseConvert<Dock, DockDTO>
2026-01-16 19:38:06 +08:00
{
2026-01-21 11:14:31 +08:00
2026-01-21 13:18:33 +08:00
private static final DockDTOConvert INSTANCE = new DockDTOConvert();
2026-01-21 11:14:31 +08:00
2026-01-21 13:18:33 +08:00
private DockDTOConvert() {
2026-01-21 11:14:31 +08:00
super(Dock.class, DockDTO.class);
}
2026-01-16 19:38:06 +08:00
/**
* Model DTO
*/
2026-01-21 11:14:31 +08:00
public static DockDTO from(Dock model)
2026-01-16 19:38:06 +08:00
{
2026-01-21 11:14:31 +08:00
return INSTANCE.innerFrom(model);
2026-01-16 19:38:06 +08:00
}
/**
* DTO Model
*/
2026-01-21 11:14:31 +08:00
public static Dock to(DockDTO dto)
2026-01-16 19:38:06 +08:00
{
2026-01-21 11:14:31 +08:00
return INSTANCE.innerTo(dto);
2026-01-16 19:38:06 +08:00
}
/**
* Model List DTO List
*/
2026-01-21 11:14:31 +08:00
public static List<DockDTO> fromList(List<Dock> modelList)
{
return INSTANCE.innerFromList(modelList);
}
/**
* DTO List Model List
*/
public static List<Dock> toList(List<DockDTO> dtoList)
2026-01-16 19:38:06 +08:00
{
2026-01-21 11:14:31 +08:00
return INSTANCE.innerToList(dtoList);
2026-01-16 19:38:06 +08:00
}
2026-01-21 11:14:31 +08:00
2026-01-16 19:38:06 +08:00
}