package com.jojubanking.boot.module.system.convert.userinfo;

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.app.userinfo.vo.AppUserInfoCreateReqVO;
import com.jojubanking.boot.module.system.controller.app.userinfo.vo.AppUserInfoExcelVO;
import com.jojubanking.boot.module.system.controller.app.userinfo.vo.AppUserInfoRespVO;
import com.jojubanking.boot.module.system.controller.app.userinfo.vo.AppUserInfoUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.userinfo.UserInfoDO;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2025-12-05T11:32:08+0800",
    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_201 (Oracle Corporation)"
)
public class UserInfoConvertImpl implements UserInfoConvert {

    @Override
    public UserInfoDO convert(AppUserInfoCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        UserInfoDO userInfoDO = new UserInfoDO();

        userInfoDO.setOpenid( bean.getOpenid() );
        userInfoDO.setName( bean.getName() );
        userInfoDO.setUser( bean.getUser() );
        userInfoDO.setPassword( bean.getPassword() );
        userInfoDO.setPhone( bean.getPhone() );
        userInfoDO.setIdno( bean.getIdno() );
        userInfoDO.setEmail( bean.getEmail() );
        userInfoDO.setRemark( bean.getRemark() );
        userInfoDO.setHeadurl( bean.getHeadurl() );
        userInfoDO.setBirthdate( bean.getBirthdate() );
        userInfoDO.setNativeplace( bean.getNativeplace() );
        userInfoDO.setCountry( bean.getCountry() );
        userInfoDO.setProvince( bean.getProvince() );
        userInfoDO.setCity( bean.getCity() );
        userInfoDO.setSex( bean.getSex() );

        return userInfoDO;
    }

    @Override
    public UserInfoDO convert(AppUserInfoUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        UserInfoDO userInfoDO = new UserInfoDO();

        userInfoDO.setId( bean.getId() );
        userInfoDO.setOpenid( bean.getOpenid() );
        userInfoDO.setName( bean.getName() );
        userInfoDO.setUser( bean.getUser() );
        userInfoDO.setPassword( bean.getPassword() );
        userInfoDO.setPhone( bean.getPhone() );
        userInfoDO.setIdno( bean.getIdno() );
        userInfoDO.setEmail( bean.getEmail() );
        userInfoDO.setRemark( bean.getRemark() );
        userInfoDO.setHeadurl( bean.getHeadurl() );
        userInfoDO.setBirthdate( bean.getBirthdate() );
        userInfoDO.setNativeplace( bean.getNativeplace() );
        userInfoDO.setCountry( bean.getCountry() );
        userInfoDO.setProvince( bean.getProvince() );
        userInfoDO.setCity( bean.getCity() );
        userInfoDO.setSex( bean.getSex() );

        return userInfoDO;
    }

    @Override
    public AppUserInfoRespVO convert(UserInfoDO bean) {
        if ( bean == null ) {
            return null;
        }

        AppUserInfoRespVO appUserInfoRespVO = new AppUserInfoRespVO();

        appUserInfoRespVO.setOpenid( bean.getOpenid() );
        appUserInfoRespVO.setName( bean.getName() );
        appUserInfoRespVO.setUser( bean.getUser() );
        appUserInfoRespVO.setPassword( bean.getPassword() );
        appUserInfoRespVO.setPhone( bean.getPhone() );
        appUserInfoRespVO.setIdno( bean.getIdno() );
        appUserInfoRespVO.setEmail( bean.getEmail() );
        appUserInfoRespVO.setRemark( bean.getRemark() );
        appUserInfoRespVO.setHeadurl( bean.getHeadurl() );
        appUserInfoRespVO.setBirthdate( bean.getBirthdate() );
        appUserInfoRespVO.setNativeplace( bean.getNativeplace() );
        appUserInfoRespVO.setCountry( bean.getCountry() );
        appUserInfoRespVO.setProvince( bean.getProvince() );
        appUserInfoRespVO.setCity( bean.getCity() );
        appUserInfoRespVO.setSex( bean.getSex() );
        appUserInfoRespVO.setId( bean.getId() );
        appUserInfoRespVO.setCreateTime( bean.getCreateTime() );

        return appUserInfoRespVO;
    }

    @Override
    public List<AppUserInfoRespVO> convertList(List<UserInfoDO> list) {
        if ( list == null ) {
            return null;
        }

        List<AppUserInfoRespVO> list1 = new ArrayList<AppUserInfoRespVO>( list.size() );
        for ( UserInfoDO userInfoDO : list ) {
            list1.add( convert( userInfoDO ) );
        }

        return list1;
    }

    @Override
    public PageResult<AppUserInfoRespVO> convertPage(PageResult<UserInfoDO> page) {
        if ( page == null ) {
            return null;
        }

        PageResult<AppUserInfoRespVO> pageResult = new PageResult<AppUserInfoRespVO>();

        pageResult.setList( convertList( page.getList() ) );
        pageResult.setTotal( page.getTotal() );

        return pageResult;
    }

    @Override
    public List<AppUserInfoExcelVO> convertList02(List<UserInfoDO> list) {
        if ( list == null ) {
            return null;
        }

        List<AppUserInfoExcelVO> list1 = new ArrayList<AppUserInfoExcelVO>( list.size() );
        for ( UserInfoDO userInfoDO : list ) {
            list1.add( userInfoDOToAppUserInfoExcelVO( userInfoDO ) );
        }

        return list1;
    }

    protected AppUserInfoExcelVO userInfoDOToAppUserInfoExcelVO(UserInfoDO userInfoDO) {
        if ( userInfoDO == null ) {
            return null;
        }

        AppUserInfoExcelVO appUserInfoExcelVO = new AppUserInfoExcelVO();

        appUserInfoExcelVO.setId( userInfoDO.getId() );
        appUserInfoExcelVO.setOpenid( userInfoDO.getOpenid() );
        appUserInfoExcelVO.setName( userInfoDO.getName() );
        appUserInfoExcelVO.setUser( userInfoDO.getUser() );
        appUserInfoExcelVO.setPassword( userInfoDO.getPassword() );
        appUserInfoExcelVO.setPhone( userInfoDO.getPhone() );
        appUserInfoExcelVO.setIdno( userInfoDO.getIdno() );
        appUserInfoExcelVO.setEmail( userInfoDO.getEmail() );
        appUserInfoExcelVO.setRemark( userInfoDO.getRemark() );
        appUserInfoExcelVO.setHeadurl( userInfoDO.getHeadurl() );
        appUserInfoExcelVO.setBirthdate( userInfoDO.getBirthdate() );
        appUserInfoExcelVO.setNativeplace( userInfoDO.getNativeplace() );
        appUserInfoExcelVO.setCountry( userInfoDO.getCountry() );
        appUserInfoExcelVO.setProvince( userInfoDO.getProvince() );
        appUserInfoExcelVO.setCity( userInfoDO.getCity() );
        appUserInfoExcelVO.setSex( userInfoDO.getSex() );
        appUserInfoExcelVO.setCreateTime( userInfoDO.getCreateTime() );

        return appUserInfoExcelVO;
    }
}
