实体类转换

This commit is contained in:
2024-03-05 16:11:02 +08:00
parent bb3fcfa769
commit 2c29f26fc8

View File

@@ -36,10 +36,6 @@ import java.util.stream.Collectors;
**/
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface TbProductGroupMapper extends BaseMapper<TbProductGroupDto, TbProductGroup> {
@Mapping(target = "productIds", source = "productIds")
TbProductGroupDto toDto(TbProductGroup entity);
// 自定义的字符串到整数列表的转换方法
default List<Integer> map(String value) {
if (value == null || value.isEmpty()) {