refactor: 用户导入优化
This commit is contained in:
@@ -5,6 +5,7 @@ import com.youlai.system.pojo.bo.UserBO;
|
||||
import com.youlai.system.pojo.entity.SysUser;
|
||||
import com.youlai.system.pojo.form.UserForm;
|
||||
import com.youlai.system.pojo.bo.UserFormBO;
|
||||
import com.youlai.system.pojo.vo.UserImportVO;
|
||||
import com.youlai.system.pojo.vo.UserInfoVO;
|
||||
import com.youlai.system.pojo.vo.UserPageVO;
|
||||
import org.mapstruct.InheritInverseConfiguration;
|
||||
@@ -22,13 +23,13 @@ import org.mapstruct.Mappings;
|
||||
public interface UserConverter {
|
||||
|
||||
@Mappings({
|
||||
@Mapping(target = "genderLabel", expression = "java(com.youlai.system.common.base.IBaseEnum.getLabelByValue(po.getGender(), com.youlai.system.common.enums.GenderEnum.class))")
|
||||
@Mapping(target = "genderLabel", expression = "java(com.youlai.system.common.base.IBaseEnum.getLabelByValue(bo.getGender(), com.youlai.system.common.enums.GenderEnum.class))")
|
||||
})
|
||||
UserPageVO po2Vo(UserBO po);
|
||||
UserPageVO bo2Vo(UserBO bo);
|
||||
|
||||
Page<UserPageVO> po2Vo(Page<UserBO> po);
|
||||
Page<UserPageVO> bo2Vo(Page<UserBO> bo);
|
||||
|
||||
UserForm po2Form(UserFormBO po);
|
||||
UserForm bo2Form(UserFormBO bo);
|
||||
|
||||
UserForm entity2Form(SysUser entity);
|
||||
|
||||
@@ -38,7 +39,8 @@ public interface UserConverter {
|
||||
@Mappings({
|
||||
@Mapping(target = "userId", source = "id")
|
||||
})
|
||||
UserInfoVO entity2LoginUser(SysUser entity);
|
||||
UserInfoVO entity2UserInfoVo(SysUser entity);
|
||||
|
||||
SysUser importVo2Entity(UserImportVO vo);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user