package com.xcong.excoin.modules.test.mapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.xcong.excoin.modules.test.dto.TestUserDto; import com.xcong.excoin.modules.test.entity.TestUserEntity; import com.xcong.excoin.modules.test.vo.TestUserVo; import com.xcong.excoin.modules.test.vo.TestVo; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; import java.util.List; /** * @author wzy * @date 2020-05-09 15:26 **/ @Mapper public abstract class TestUserEntityMapper { public static final TestUserEntityMapper INSTANCE = Mappers.getMapper(TestUserEntityMapper.class); public abstract TestUserEntity dtoToEntity(TestUserDto testUserDto); @Mapping(source = "name", target = "name") @Mapping(source = "password", target = "pwd") public abstract TestVo entityToTestVo(TestUserEntity testUserEntity); @Mapping(source = "name", target = "userName") public abstract TestUserVo entityToVo(TestUserEntity testUserEntity); public abstract List entityListToVoList(List testUserEntities); public abstract Page pageEntityToPageVO(IPage list); }