All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.haoxuer.discover.user.rest.convert.UserRoleCatalogResponseConvert Maven / Gradle / Ivy

There is a newer version: 3.3.18-20230117
Show newest version
package com.haoxuer.discover.user.rest.convert;

import com.haoxuer.discover.user.api.domain.response.UserRoleCatalogResponse;
import com.haoxuer.discover.user.data.entity.UserRoleCatalog;
import com.haoxuer.discover.data.rest.core.Conver;
import com.haoxuer.discover.data.utils.BeanDataUtils;

public class UserRoleCatalogResponseConvert implements Conver {
    @Override
    public UserRoleCatalogResponse conver(UserRoleCatalog source) {
        UserRoleCatalogResponse result = new UserRoleCatalogResponse();
        BeanDataUtils.copyProperties(source,result);

        if(source.getParent()!=null){
           result.setParent(source.getParent().getId());
        }
         if(source.getParent()!=null){
            result.setParentName(source.getParent().getName());
         }


        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy