我有一个实体类 PersonEntity 并且对应于我有 Dto 类
@Entity(value="person")
class PersonEntity{
String name;
String id;
}
**DTO**
class PersonDto{
String name;
String id;
String desc; (This is a lookup from a map with id attribute)
}
In my mapper class, I am able to change my entity list to Dto list with below code.
public interface MyMapper{
List<PersonDto> entityListToDtoList(<List<PersonEntity>)
}
如何使用我的查找图来获取描述并在我的 DTO 类中设置。我无法弄清楚如何使用以下代码确定值。
List<PersonDto> entityListToDtoList(<List<PersonEntity>,@Context Map<String,String> lookupMap)