“mitao”
2026-02-11 504880873eeea15bcbe7d5a79608ccc4abacb0d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.estate.expert.admin.domain.user;
 
import com.estate.expert.admin.domain.common.mapper.EntityRefMapper;
import com.estate.expert.admin.domain.common.mapper.IMapperBase;
import com.estate.expert.admin.utils.MappingIgnore;
import org.mapstruct.*;
 
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE, componentModel = MappingConstants.ComponentModel.SPRING, uses = {EntityRefMapper.class})
public interface UserMapper extends IMapperBase<UserDto, User> {
 
    @InheritConfiguration(name = "toEntity")
    @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
//    @Mapping(target = "mobile", ignore = true) //设置了手机号不能被修改
    @MappingIgnore
    @Override
    User partialUpdate(UserDto userDto, @MappingTarget User user);
}