You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wx-dump-MeiFox/wx-dump-admin/src/main/java/com/xcs/wx/mapping/ContactLabelMapping.java

27 lines
1.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.xcs.wx.mapping; // 定义了这个接口的包名表示这个接口属于com.xcs.wx.mapping包。
import com.xcs.wx.domain.ContactLabel; // 导入ContactLabel实体类这个类定义了联系人标签的数据结构。
import com.xcs.wx.domain.vo.ContactLabelVO; // 导入ContactLabelVO类这个类定义了联系人标签视图对象的数据结构。
import org.mapstruct.Mapper; // 导入MapStruct的@Mapper注解用于定义映射接口。
import java.util.List; // 导入Java的List接口用于返回列表类型的数据。
/**
* 联系人标签 Mapping
* 这个接口定义了联系人标签相关对象之间的转换映射。
*
* @author xcs // 表示这个接口的作者。
* @date 2023年12月22日 15时00分 // 表示这个接口的创建日期和时间。
**/
@Mapper(componentModel = "spring") // 使用MapStruct的@Mapper注解指定该接口为映射接口并配置为Spring组件。
public interface ContactLabelMapping { // 定义了一个名为ContactLabelMapping的接口用于联系人标签对象之间的转换映射。
/**
* 参数转换
* 将一组ContactLabel对象转换为ContactLabelVO对象。
*
* @param labels 入参待转换的ContactLabel对象列表。
* @return List<ContactLabelVO> 转换后的ContactLabel视图对象列表。
*/
List<ContactLabelVO> convert(List<ContactLabel> labels); // 定义了一个方法将ContactLabel列表转换为ContactLabelVO列表。
}