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

com.haoxuer.discover.user.rest.convert.UserLoginLogSimpleConvert 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.simple.UserLoginLogSimple;
import com.haoxuer.discover.user.data.entity.UserLoginLog;
import com.haoxuer.discover.data.rest.core.Conver;
public class UserLoginLogSimpleConvert implements Conver {


    @Override
    public UserLoginLogSimple conver(UserLoginLog source) {
        UserLoginLogSimple result = new UserLoginLogSimple();

            result.setId(source.getId());
             result.setNote(source.getNote());
             result.setPassword(source.getPassword());
             result.setIp(source.getIp());
             result.setClient(source.getClient());
             result.setLastDate(source.getLastDate());
             result.setState(source.getState());
            if(source.getUser()!=null){
               result.setUser(source.getUser().getId());
            }
             result.setAddDate(source.getAddDate());
             if(source.getUser()!=null){
                result.setUserName(source.getUser().getName());
             }
             result.setAccount(source.getAccount());

             result.setStateName(source.getState()+"");
        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy