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

import com.jojubanking.boot.module.system.api.social.dto.SocialUserBindReqDTO;
import com.jojubanking.boot.module.system.api.social.dto.SocialUserUnbindReqDTO;
import com.jojubanking.boot.module.system.controller.admin.socail.vo.SocialUserBindReqVO;
import com.jojubanking.boot.module.system.controller.admin.socail.vo.SocialUserUnbindReqVO;
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 SocialUserConvertImpl implements SocialUserConvert {

    @Override
    public SocialUserBindReqDTO convert(Long userId, Integer userType, SocialUserBindReqVO reqVO) {
        if ( userId == null && userType == null && reqVO == null ) {
            return null;
        }

        SocialUserBindReqDTO socialUserBindReqDTO = new SocialUserBindReqDTO();

        if ( userId != null ) {
            socialUserBindReqDTO.setUserId( userId );
        }
        if ( userType != null ) {
            socialUserBindReqDTO.setUserType( userType );
        }
        if ( reqVO != null ) {
            socialUserBindReqDTO.setType( reqVO.getType() );
            socialUserBindReqDTO.setCode( reqVO.getCode() );
            socialUserBindReqDTO.setState( reqVO.getState() );
        }

        return socialUserBindReqDTO;
    }

    @Override
    public SocialUserUnbindReqDTO convert(Long userId, Integer userType, SocialUserUnbindReqVO reqVO) {
        if ( userId == null && userType == null && reqVO == null ) {
            return null;
        }

        SocialUserUnbindReqDTO socialUserUnbindReqDTO = new SocialUserUnbindReqDTO();

        if ( userId != null ) {
            socialUserUnbindReqDTO.setUserId( userId );
        }
        if ( userType != null ) {
            socialUserUnbindReqDTO.setUserType( userType );
        }
        if ( reqVO != null ) {
            socialUserUnbindReqDTO.setType( reqVO.getType() );
        }

        return socialUserUnbindReqDTO;
    }
}
