package cn.pluss.platform.converter;

import cn.pluss.platform.dto.AccountDTO;
import cn.pluss.platform.dto.BankCardDTO;
import cn.pluss.platform.dto.BankInfoDTO;
import cn.pluss.platform.dto.DeviceStockDTO;
import cn.pluss.platform.dto.MercTradeDataDTO;
import cn.pluss.platform.dto.RegionReflectDTO;
import cn.pluss.platform.entity.Account;
import cn.pluss.platform.entity.BankCard;
import cn.pluss.platform.entity.DeviceDetail;
import cn.pluss.platform.entity.DeviceStock;
import cn.pluss.platform.entity.IdCard;
import cn.pluss.platform.entity.IpLocationCache;
import cn.pluss.platform.entity.JftBankCard;
import cn.pluss.platform.entity.JftMercBaseInfo;
import cn.pluss.platform.entity.JftMercPaymentChannel;
import cn.pluss.platform.entity.JftMerchantRate;
import cn.pluss.platform.entity.JftMerchantRateRecord;
import cn.pluss.platform.entity.JftReceiptInfo;
import cn.pluss.platform.entity.MercMemberSet;
import cn.pluss.platform.entity.MerchantCashPlaceStaff;
import cn.pluss.platform.entity.MerchantChannelStatus;
import cn.pluss.platform.entity.MerchantImage;
import cn.pluss.platform.entity.MerchantRateNew;
import cn.pluss.platform.entity.MerchantRateNewRecord;
import cn.pluss.platform.entity.RegionReflect;
import cn.pluss.platform.entity.UserApp;
import cn.pluss.platform.entity.UserVoice;
import cn.pluss.platform.vo.AccountVO;
import cn.pluss.platform.vo.ChannelStatusVO;
import cn.pluss.platform.vo.DeviceDetailVO;
import cn.pluss.platform.vo.DeviceStockVO;
import cn.pluss.platform.vo.JftMercBaseInfoVO;
import cn.pluss.platform.vo.JftMercPaymentChannelVO;
import cn.pluss.platform.vo.JftReceiptInfoVO;
import cn.pluss.platform.vo.MercMemberSetVO;
import cn.pluss.platform.vo.MerchantCashPlaceStaffVO;
import cn.pluss.platform.vo.MerchantRateNewRecordVO;
import cn.pluss.platform.vo.MerchantRateNewVO;
import cn.pluss.platform.vo.UserAppVO;
import com.alibaba.fastjson.JSONObject;
import com.aliyuncs.geoip.model.v20200101.DescribeIpv4LocationResponse;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2023-01-29T10:16:06+0800",
    comments = "version: 1.4.2.Final, compiler: javac, environment: Java 1.8.0_362 (Amazon.com Inc.)"
)
public class ConverterImpl implements Converter {

    @Override
    public MerchantCashPlaceStaffVO toVO(MerchantCashPlaceStaff cashPlaceStaff) {
        if ( cashPlaceStaff == null ) {
            return null;
        }

        MerchantCashPlaceStaffVO merchantCashPlaceStaffVO = new MerchantCashPlaceStaffVO();

        merchantCashPlaceStaffVO.setId( cashPlaceStaff.getId() );
        merchantCashPlaceStaffVO.setUserId( cashPlaceStaff.getUserId() );
        merchantCashPlaceStaffVO.setCashPlaceId( cashPlaceStaff.getCashPlaceId() );
        merchantCashPlaceStaffVO.setRemark( cashPlaceStaff.getRemark() );
        merchantCashPlaceStaffVO.setStatus( cashPlaceStaff.getStatus() );
        merchantCashPlaceStaffVO.setCreateTime( cashPlaceStaff.getCreateTime() );
        merchantCashPlaceStaffVO.setCreateTimeStart( cashPlaceStaff.getCreateTimeStart() );
        merchantCashPlaceStaffVO.setCreateTimeEnd( cashPlaceStaff.getCreateTimeEnd() );
        merchantCashPlaceStaffVO.setUpdateTime( cashPlaceStaff.getUpdateTime() );
        merchantCashPlaceStaffVO.setUpdateTimeStart( cashPlaceStaff.getUpdateTimeStart() );
        merchantCashPlaceStaffVO.setUpdateTimeEnd( cashPlaceStaff.getUpdateTimeEnd() );

        return merchantCashPlaceStaffVO;
    }

    @Override
    public ChannelStatusVO toVO(MerchantChannelStatus entity) {
        if ( entity == null ) {
            return null;
        }

        ChannelStatusVO channelStatusVO = new ChannelStatusVO();

        channelStatusVO.setId( entity.getId() );
        channelStatusVO.setChannel( entity.getChannel() );
        channelStatusVO.setMerchantCode( entity.getMerchantCode() );
        channelStatusVO.setMerchantId( entity.getMerchantId() );
        channelStatusVO.setStatus( entity.getStatus() );
        channelStatusVO.setAuthorizationStatus( entity.getAuthorizationStatus() );
        channelStatusVO.setThirdStatus( entity.getThirdStatus() );
        channelStatusVO.setRemark( entity.getRemark() );
        channelStatusVO.setCreateTime( entity.getCreateTime() );
        channelStatusVO.setUpdateTime( entity.getUpdateTime() );
        channelStatusVO.setApplicationId( entity.getApplicationId() );
        channelStatusVO.setCallbackStatus( entity.getCallbackStatus() );
        channelStatusVO.setSettlementType( entity.getSettlementType() );
        channelStatusVO.setSrcMerchantNo( entity.getSrcMerchantNo() );
        channelStatusVO.setVirChannelFlag( entity.getVirChannelFlag() );
        channelStatusVO.setUserId( entity.getUserId() );
        JSONObject jSONObject = entity.getExtra();
        if ( jSONObject != null ) {
            channelStatusVO.setExtra( new JSONObject( jSONObject ) );
        }
        channelStatusVO.setValid( entity.getValid() );
        channelStatusVO.setMercName( entity.getMercName() );

        return channelStatusVO;
    }

    @Override
    public RegionReflect toEntity(RegionReflectDTO dto) {
        if ( dto == null ) {
            return null;
        }

        RegionReflect regionReflect = new RegionReflect();

        regionReflect.setChannel( dto.getChannel() );
        regionReflect.setRegionSrc( dto.getRegionSrc() );
        regionReflect.setRegionDes( dto.getRegionDes() );

        return regionReflect;
    }

    @Override
    public MerchantRateNewVO toVO(MerchantRateNew merchantRateNew) {
        if ( merchantRateNew == null ) {
            return null;
        }

        MerchantRateNewVO merchantRateNewVO = new MerchantRateNewVO();

        merchantRateNewVO.setUserId( merchantRateNew.getUserId() );
        merchantRateNewVO.setId( merchantRateNew.getId() );
        merchantRateNewVO.setChannel( merchantRateNew.getChannel() );
        merchantRateNewVO.setMerchantId( merchantRateNew.getMerchantId() );
        merchantRateNewVO.setWxRate( merchantRateNew.getWxRate() );
        merchantRateNewVO.setAliRate( merchantRateNew.getAliRate() );
        merchantRateNewVO.setBankRate( merchantRateNew.getBankRate() );
        merchantRateNewVO.setBankRateLarge( merchantRateNew.getBankRateLarge() );
        merchantRateNewVO.setWxRateValue( merchantRateNew.getWxRateValue() );
        merchantRateNewVO.setAliRateValue( merchantRateNew.getAliRateValue() );
        merchantRateNewVO.setBankRateValue( merchantRateNew.getBankRateValue() );
        merchantRateNewVO.setBankRateLargeValue( merchantRateNew.getBankRateLargeValue() );
        merchantRateNewVO.setCreateTime( merchantRateNew.getCreateTime() );
        merchantRateNewVO.setCreateTimeStart( merchantRateNew.getCreateTimeStart() );
        merchantRateNewVO.setCreateTimeEnd( merchantRateNew.getCreateTimeEnd() );
        merchantRateNewVO.setUpdateTime( merchantRateNew.getUpdateTime() );
        merchantRateNewVO.setUpdateTimeStart( merchantRateNew.getUpdateTimeStart() );
        merchantRateNewVO.setUpdateTimeEnd( merchantRateNew.getUpdateTimeEnd() );

        return merchantRateNewVO;
    }

    @Override
    public MerchantRateNew trans(MerchantRateNewRecord rateNewRecord) {
        if ( rateNewRecord == null ) {
            return null;
        }

        MerchantRateNew merchantRateNew = new MerchantRateNew();

        merchantRateNew.setId( rateNewRecord.getId() );
        merchantRateNew.setChannel( rateNewRecord.getChannel() );
        merchantRateNew.setMerchantId( rateNewRecord.getMerchantId() );
        merchantRateNew.setWxRate( rateNewRecord.getWxRate() );
        merchantRateNew.setAliRate( rateNewRecord.getAliRate() );
        merchantRateNew.setBankRate( rateNewRecord.getBankRate() );
        merchantRateNew.setBankRateLarge( rateNewRecord.getBankRateLarge() );
        merchantRateNew.setCreateTime( rateNewRecord.getCreateTime() );
        merchantRateNew.setCreateTimeStart( rateNewRecord.getCreateTimeStart() );
        merchantRateNew.setCreateTimeEnd( rateNewRecord.getCreateTimeEnd() );
        merchantRateNew.setUpdateTime( rateNewRecord.getUpdateTime() );
        merchantRateNew.setUpdateTimeStart( rateNewRecord.getUpdateTimeStart() );
        merchantRateNew.setUpdateTimeEnd( rateNewRecord.getUpdateTimeEnd() );

        return merchantRateNew;
    }

    @Override
    public MerchantRateNewRecord trans(MerchantRateNew rateNew) {
        if ( rateNew == null ) {
            return null;
        }

        MerchantRateNewRecord merchantRateNewRecord = new MerchantRateNewRecord();

        merchantRateNewRecord.setId( rateNew.getId() );
        merchantRateNewRecord.setChannel( rateNew.getChannel() );
        merchantRateNewRecord.setMerchantId( rateNew.getMerchantId() );
        merchantRateNewRecord.setWxRate( rateNew.getWxRate() );
        merchantRateNewRecord.setAliRate( rateNew.getAliRate() );
        merchantRateNewRecord.setBankRate( rateNew.getBankRate() );
        merchantRateNewRecord.setBankRateLarge( rateNew.getBankRateLarge() );
        merchantRateNewRecord.setCreateTime( rateNew.getCreateTime() );
        merchantRateNewRecord.setCreateTimeStart( rateNew.getCreateTimeStart() );
        merchantRateNewRecord.setCreateTimeEnd( rateNew.getCreateTimeEnd() );
        merchantRateNewRecord.setUpdateTime( rateNew.getUpdateTime() );
        merchantRateNewRecord.setUpdateTimeStart( rateNew.getUpdateTimeStart() );
        merchantRateNewRecord.setUpdateTimeEnd( rateNew.getUpdateTimeEnd() );

        return merchantRateNewRecord;
    }

    @Override
    public void cp(MerchantRateNewRecord source, MerchantRateNew target) {
        if ( source == null ) {
            return;
        }

        if ( source.getChannel() != null ) {
            target.setChannel( source.getChannel() );
        }
        if ( source.getMerchantId() != null ) {
            target.setMerchantId( source.getMerchantId() );
        }
        if ( source.getWxRate() != null ) {
            target.setWxRate( source.getWxRate() );
        }
        if ( source.getAliRate() != null ) {
            target.setAliRate( source.getAliRate() );
        }
        if ( source.getBankRate() != null ) {
            target.setBankRate( source.getBankRate() );
        }
        if ( source.getBankRateLarge() != null ) {
            target.setBankRateLarge( source.getBankRateLarge() );
        }
        if ( source.getCreateTimeStart() != null ) {
            target.setCreateTimeStart( source.getCreateTimeStart() );
        }
        if ( source.getCreateTimeEnd() != null ) {
            target.setCreateTimeEnd( source.getCreateTimeEnd() );
        }
        if ( source.getUpdateTimeStart() != null ) {
            target.setUpdateTimeStart( source.getUpdateTimeStart() );
        }
        if ( source.getUpdateTimeEnd() != null ) {
            target.setUpdateTimeEnd( source.getUpdateTimeEnd() );
        }
    }

    @Override
    public MerchantRateNewRecordVO toVO(MerchantRateNewRecord rateNewRecord) {
        if ( rateNewRecord == null ) {
            return null;
        }

        MerchantRateNewRecordVO merchantRateNewRecordVO = new MerchantRateNewRecordVO();

        merchantRateNewRecordVO.setId( rateNewRecord.getId() );
        merchantRateNewRecordVO.setChannel( rateNewRecord.getChannel() );
        merchantRateNewRecordVO.setMerchantId( rateNewRecord.getMerchantId() );
        merchantRateNewRecordVO.setWxRate( rateNewRecord.getWxRate() );
        merchantRateNewRecordVO.setAliRate( rateNewRecord.getAliRate() );
        merchantRateNewRecordVO.setBankRate( rateNewRecord.getBankRate() );
        merchantRateNewRecordVO.setBankRateLarge( rateNewRecord.getBankRateLarge() );
        merchantRateNewRecordVO.setRemark( rateNewRecord.getRemark() );
        merchantRateNewRecordVO.setStatus( rateNewRecord.getStatus() );
        merchantRateNewRecordVO.setCreateTime( rateNewRecord.getCreateTime() );
        merchantRateNewRecordVO.setCreateTimeStart( rateNewRecord.getCreateTimeStart() );
        merchantRateNewRecordVO.setCreateTimeEnd( rateNewRecord.getCreateTimeEnd() );
        merchantRateNewRecordVO.setUpdateTime( rateNewRecord.getUpdateTime() );
        merchantRateNewRecordVO.setUpdateTimeStart( rateNewRecord.getUpdateTimeStart() );
        merchantRateNewRecordVO.setUpdateTimeEnd( rateNewRecord.getUpdateTimeEnd() );

        return merchantRateNewRecordVO;
    }

    @Override
    public AccountDTO toDTO(Account account) {
        if ( account == null ) {
            return null;
        }

        AccountDTO accountDTO = new AccountDTO();

        accountDTO.setId( account.getId() );
        accountDTO.setUserId( account.getUserId() );
        accountDTO.setCertificateUrl( account.getCertificateUrl() );
        accountDTO.setSettleType( account.getSettleType() );
        accountDTO.setIdCardId( account.getIdCardId() );
        accountDTO.setBankCardId( account.getBankCardId() );
        accountDTO.setChannelType( account.getChannelType() );
        accountDTO.setCreateTime( account.getCreateTime() );
        accountDTO.setCreateTimeStart( account.getCreateTimeStart() );
        accountDTO.setCreateTimeEnd( account.getCreateTimeEnd() );
        accountDTO.setUpdateTime( account.getUpdateTime() );
        accountDTO.setUpdateTimeStart( account.getUpdateTimeStart() );
        accountDTO.setUpdateTimeEnd( account.getUpdateTimeEnd() );
        JSONObject jSONObject = account.getBak();
        if ( jSONObject != null ) {
            accountDTO.setBak( new JSONObject( jSONObject ) );
        }

        return accountDTO;
    }

    @Override
    public Account toEntity(AccountDTO accountDTO) {
        if ( accountDTO == null ) {
            return null;
        }

        Account account = new Account();

        account.setId( accountDTO.getId() );
        account.setUserId( accountDTO.getUserId() );
        account.setCertificateUrl( accountDTO.getCertificateUrl() );
        account.setSettleType( accountDTO.getSettleType() );
        account.setIdCardId( accountDTO.getIdCardId() );
        account.setBankCardId( accountDTO.getBankCardId() );
        account.setChannelType( accountDTO.getChannelType() );
        account.setCreateTime( accountDTO.getCreateTime() );
        account.setCreateTimeStart( accountDTO.getCreateTimeStart() );
        account.setCreateTimeEnd( accountDTO.getCreateTimeEnd() );
        account.setUpdateTime( accountDTO.getUpdateTime() );
        account.setUpdateTimeStart( accountDTO.getUpdateTimeStart() );
        account.setUpdateTimeEnd( accountDTO.getUpdateTimeEnd() );
        JSONObject jSONObject = accountDTO.getBak();
        if ( jSONObject != null ) {
            account.setBak( new JSONObject( jSONObject ) );
        }

        return account;
    }

    @Override
    public void cp(IdCard source, IdCard target) {
        if ( source == null ) {
            return;
        }

        if ( source.getUserId() != null ) {
            target.setUserId( source.getUserId() );
        }
        if ( source.getCertType() != null ) {
            target.setCertType( source.getCertType() );
        }
        if ( source.getUserType() != null ) {
            target.setUserType( source.getUserType() );
        }
        if ( source.getCertNo() != null ) {
            target.setCertNo( source.getCertNo() );
        }
        if ( source.getCertName() != null ) {
            target.setCertName( source.getCertName() );
        }
        if ( source.getCertStartTime() != null ) {
            target.setCertStartTime( source.getCertStartTime() );
        }
        if ( source.getCertEndTime() != null ) {
            target.setCertEndTime( source.getCertEndTime() );
        }
        if ( source.getCertAddress() != null ) {
            target.setCertAddress( source.getCertAddress() );
        }
        if ( source.getCreateTimeStart() != null ) {
            target.setCreateTimeStart( source.getCreateTimeStart() );
        }
        if ( source.getCreateTimeEnd() != null ) {
            target.setCreateTimeEnd( source.getCreateTimeEnd() );
        }
        if ( source.getUpdateTimeStart() != null ) {
            target.setUpdateTimeStart( source.getUpdateTimeStart() );
        }
        if ( source.getUpdateTimeEnd() != null ) {
            target.setUpdateTimeEnd( source.getUpdateTimeEnd() );
        }
        if ( source.getImgPositive() != null ) {
            target.setImgPositive( source.getImgPositive() );
        }
        if ( source.getImgNegative() != null ) {
            target.setImgNegative( source.getImgNegative() );
        }
    }

    @Override
    public void cp(BankCard source, BankCard target) {
        if ( source == null ) {
            return;
        }

        if ( source.getUserId() != null ) {
            target.setUserId( source.getUserId() );
        }
        if ( source.getBankHolder() != null ) {
            target.setBankHolder( source.getBankHolder() );
        }
        if ( source.getBankCardNo() != null ) {
            target.setBankCardNo( source.getBankCardNo() );
        }
        if ( source.getBankName() != null ) {
            target.setBankName( source.getBankName() );
        }
        if ( source.getBranchName() != null ) {
            target.setBranchName( source.getBranchName() );
        }
        if ( source.getAccountType() != null ) {
            target.setAccountType( source.getAccountType() );
        }
        if ( source.getContactLine() != null ) {
            target.setContactLine( source.getContactLine() );
        }
        if ( source.getBranchProvince() != null ) {
            target.setBranchProvince( source.getBranchProvince() );
        }
        if ( source.getBranchCity() != null ) {
            target.setBranchCity( source.getBranchCity() );
        }
        if ( source.getBranchArea() != null ) {
            target.setBranchArea( source.getBranchArea() );
        }
        if ( source.getBankAddressNo() != null ) {
            target.setBankAddressNo( source.getBankAddressNo() );
        }
        if ( source.getPhone() != null ) {
            target.setPhone( source.getPhone() );
        }
        if ( source.getCreateTimeStart() != null ) {
            target.setCreateTimeStart( source.getCreateTimeStart() );
        }
        if ( source.getCreateTimeEnd() != null ) {
            target.setCreateTimeEnd( source.getCreateTimeEnd() );
        }
        if ( source.getUpdateTimeStart() != null ) {
            target.setUpdateTimeStart( source.getUpdateTimeStart() );
        }
        if ( source.getUpdateTimeEnd() != null ) {
            target.setUpdateTimeEnd( source.getUpdateTimeEnd() );
        }
        if ( source.getImgUrl() != null ) {
            target.setImgUrl( source.getImgUrl() );
        }
        if ( source.getLicenseUrl() != null ) {
            target.setLicenseUrl( source.getLicenseUrl() );
        }
    }

    @Override
    public void cp(Account source, AccountDTO target) {
        if ( source == null ) {
            return;
        }

        if ( source.getId() != null ) {
            target.setId( source.getId() );
        }
        if ( source.getUserId() != null ) {
            target.setUserId( source.getUserId() );
        }
        if ( source.getCertificateUrl() != null ) {
            target.setCertificateUrl( source.getCertificateUrl() );
        }
        if ( source.getSettleType() != null ) {
            target.setSettleType( source.getSettleType() );
        }
        if ( source.getIdCardId() != null ) {
            target.setIdCardId( source.getIdCardId() );
        }
        if ( source.getBankCardId() != null ) {
            target.setBankCardId( source.getBankCardId() );
        }
        if ( source.getChannelType() != null ) {
            target.setChannelType( source.getChannelType() );
        }
        if ( source.getCreateTime() != null ) {
            target.setCreateTime( source.getCreateTime() );
        }
        if ( source.getCreateTimeStart() != null ) {
            target.setCreateTimeStart( source.getCreateTimeStart() );
        }
        if ( source.getCreateTimeEnd() != null ) {
            target.setCreateTimeEnd( source.getCreateTimeEnd() );
        }
        if ( source.getUpdateTime() != null ) {
            target.setUpdateTime( source.getUpdateTime() );
        }
        if ( source.getUpdateTimeStart() != null ) {
            target.setUpdateTimeStart( source.getUpdateTimeStart() );
        }
        if ( source.getUpdateTimeEnd() != null ) {
            target.setUpdateTimeEnd( source.getUpdateTimeEnd() );
        }
        if ( target.getBak() != null ) {
            JSONObject jSONObject = source.getBak();
            if ( jSONObject != null ) {
                target.getBak().clear();
                target.getBak().putAll( jSONObject );
            }
        }
        else {
            JSONObject jSONObject = source.getBak();
            if ( jSONObject != null ) {
                target.setBak( new JSONObject( jSONObject ) );
            }
        }
    }

    @Override
    public void cp(AccountDTO source, Account target) {
        if ( source == null ) {
            return;
        }

        if ( source.getId() != null ) {
            target.setId( source.getId() );
        }
        if ( source.getUserId() != null ) {
            target.setUserId( source.getUserId() );
        }
        if ( source.getCertificateUrl() != null ) {
            target.setCertificateUrl( source.getCertificateUrl() );
        }
        if ( source.getSettleType() != null ) {
            target.setSettleType( source.getSettleType() );
        }
        if ( source.getIdCardId() != null ) {
            target.setIdCardId( source.getIdCardId() );
        }
        if ( source.getBankCardId() != null ) {
            target.setBankCardId( source.getBankCardId() );
        }
        if ( source.getChannelType() != null ) {
            target.setChannelType( source.getChannelType() );
        }
        if ( source.getCreateTime() != null ) {
            target.setCreateTime( source.getCreateTime() );
        }
        if ( source.getCreateTimeStart() != null ) {
            target.setCreateTimeStart( source.getCreateTimeStart() );
        }
        if ( source.getCreateTimeEnd() != null ) {
            target.setCreateTimeEnd( source.getCreateTimeEnd() );
        }
        if ( source.getUpdateTime() != null ) {
            target.setUpdateTime( source.getUpdateTime() );
        }
        if ( source.getUpdateTimeStart() != null ) {
            target.setUpdateTimeStart( source.getUpdateTimeStart() );
        }
        if ( source.getUpdateTimeEnd() != null ) {
            target.setUpdateTimeEnd( source.getUpdateTimeEnd() );
        }
        if ( target.getBak() != null ) {
            JSONObject jSONObject = source.getBak();
            if ( jSONObject != null ) {
                target.getBak().clear();
                target.getBak().putAll( jSONObject );
            }
        }
        else {
            JSONObject jSONObject = source.getBak();
            if ( jSONObject != null ) {
                target.setBak( new JSONObject( jSONObject ) );
            }
        }
    }

    @Override
    public void cp(BankInfoDTO source, BankCard target) {
        if ( source == null ) {
            return;
        }

        if ( source.getUserId() != null ) {
            target.setUserId( source.getUserId() );
        }
        if ( source.getBankCardNo() != null ) {
            target.setBankCardNo( source.getBankCardNo() );
        }
        if ( source.getBankName() != null ) {
            target.setBankName( source.getBankName() );
        }
        if ( source.getBranchName() != null ) {
            target.setBranchName( source.getBranchName() );
        }
        if ( source.getAccountType() != null ) {
            target.setAccountType( source.getAccountType() );
        }
        if ( source.getContactLine() != null ) {
            target.setContactLine( source.getContactLine() );
        }
        if ( source.getBranchProvince() != null ) {
            target.setBranchProvince( source.getBranchProvince() );
        }
        if ( source.getBranchCity() != null ) {
            target.setBranchCity( source.getBranchCity() );
        }
        if ( source.getBranchArea() != null ) {
            target.setBranchArea( source.getBranchArea() );
        }
        if ( source.getBankAddressNo() != null ) {
            target.setBankAddressNo( source.getBankAddressNo() );
        }
        if ( source.getPhone() != null ) {
            target.setPhone( source.getPhone() );
        }
        if ( source.getImgUrl() != null ) {
            target.setImgUrl( source.getImgUrl() );
        }
    }

    @Override
    public void cp(UserApp source, UserAppVO target) {
        if ( source == null ) {
            return;
        }

        if ( source.getId() != null ) {
            target.setId( source.getId() );
        }
        if ( source.getLoginName() != null ) {
            target.setLoginName( source.getLoginName() );
        }
        if ( source.getUserId() != null ) {
            target.setUserId( source.getUserId() );
        }
        if ( source.getUserName() != null ) {
            target.setUserName( source.getUserName() );
        }
        if ( source.getUserType() != null ) {
            target.setUserType( source.getUserType() );
        }
        if ( source.getStaffType() != null ) {
            target.setStaffType( source.getStaffType() );
        }
        if ( source.getLogo() != null ) {
            target.setLogo( source.getLogo() );
        }
        if ( source.getLevel() != null ) {
            target.setLevel( source.getLevel() );
        }
        if ( source.getCreateDt() != null ) {
            target.setCreateDt( source.getCreateDt() );
        }
        if ( source.getUpdateDt() != null ) {
            target.setUpdateDt( source.getUpdateDt() );
        }
        if ( source.getExtendProfit() != null ) {
            target.setExtendProfit( source.getExtendProfit() );
        }
        if ( source.getStatus() != null ) {
            target.setStatus( source.getStatus() );
        }
        if ( source.getFansProfit() != null ) {
            target.setFansProfit( source.getFansProfit() );
        }
        if ( source.getCashProfit() != null ) {
            target.setCashProfit( source.getCashProfit() );
        }
        if ( source.getParentId() != null ) {
            target.setParentId( source.getParentId() );
        }
        if ( source.getAgentStaffId() != null ) {
            target.setAgentStaffId( source.getAgentStaffId() );
        }
        if ( source.getInviteNum() != null ) {
            target.setInviteNum( source.getInviteNum() );
        }
        if ( source.getTradeMoney() != null ) {
            target.setTradeMoney( source.getTradeMoney() );
        }
        if ( source.getCertnum() != null ) {
            target.setCertnum( source.getCertnum() );
        }
        if ( source.getCertReason() != null ) {
            target.setCertReason( source.getCertReason() );
        }
        if ( source.getBankBranch() != null ) {
            target.setBankBranch( source.getBankBranch() );
        }
        if ( source.getBankName() != null ) {
            target.setBankName( source.getBankName() );
        }
        if ( source.getBankNo() != null ) {
            target.setBankNo( source.getBankNo() );
        }
        if ( source.getPhone() != null ) {
            target.setPhone( source.getPhone() );
        }
        if ( source.getBankStatus() != null ) {
            target.setBankStatus( source.getBankStatus() );
        }
        if ( source.getBankReason() != null ) {
            target.setBankReason( source.getBankReason() );
        }
        if ( source.getMerchantCode() != null ) {
            target.setMerchantCode( source.getMerchantCode() );
        }
        if ( source.getSort() != null ) {
            target.setSort( source.getSort() );
        }
        if ( source.getMerchantName() != null ) {
            target.setMerchantName( source.getMerchantName() );
        }
        if ( source.getStoreName() != null ) {
            target.setStoreName( source.getStoreName() );
        }
        if ( source.getStoreId() != null ) {
            target.setStoreId( source.getStoreId() );
        }
        if ( source.getContactName() != null ) {
            target.setContactName( source.getContactName() );
        }
        if ( source.getProductDesc() != null ) {
            target.setProductDesc( source.getProductDesc() );
        }
        if ( source.getBussAuthNum() != null ) {
            target.setBussAuthNum( source.getBussAuthNum() );
        }
        if ( source.getAisleSwitch() != null ) {
            target.setAisleSwitch( source.getAisleSwitch() );
        }
        if ( source.getToken() != null ) {
            target.setToken( source.getToken() );
        }
        if ( source.getIsVoice() != null ) {
            target.setIsVoice( source.getIsVoice() );
        }
        if ( source.getPIdArr() != null ) {
            target.setPIdArr( source.getPIdArr() );
        }
        if ( source.getAuditReason() != null ) {
            target.setAuditReason( source.getAuditReason() );
        }
        if ( source.getIsFixedRate() != null ) {
            target.setIsFixedRate( source.getIsFixedRate() );
        }
        if ( source.getAutoAudit() != null ) {
            target.setAutoAudit( source.getAutoAudit() );
        }
        if ( source.getPayEcdemicSwitch() != null ) {
            target.setPayEcdemicSwitch( source.getPayEcdemicSwitch() );
        }
        if ( source.getIsMarket() != null ) {
            target.setIsMarket( source.getIsMarket() );
        }
        if ( source.getIsUnionPay() != null ) {
            target.setIsUnionPay( source.getIsUnionPay() );
        }
        if ( source.getRoleCode() != null ) {
            target.setRoleCode( source.getRoleCode() );
        }
        if ( source.getLevelCode() != null ) {
            target.setLevelCode( source.getLevelCode() );
        }
        if ( source.getLicenseFullName() != null ) {
            target.setLicenseFullName( source.getLicenseFullName() );
        }
        if ( target.getMerchantImagesList() != null ) {
            List<MerchantImage> list = source.getMerchantImagesList();
            if ( list != null ) {
                target.getMerchantImagesList().clear();
                target.getMerchantImagesList().addAll( list );
            }
        }
        else {
            List<MerchantImage> list = source.getMerchantImagesList();
            if ( list != null ) {
                target.setMerchantImagesList( new ArrayList<MerchantImage>( list ) );
            }
        }
        if ( source.getRegistUrl() != null ) {
            target.setRegistUrl( source.getRegistUrl() );
        }
        if ( source.getPassword() != null ) {
            target.setPassword( source.getPassword() );
        }
        if ( source.getMerchantStatus() != null ) {
            target.setMerchantStatus( source.getMerchantStatus() );
        }
        if ( source.getMerchantReason() != null ) {
            target.setMerchantReason( source.getMerchantReason() );
        }
        if ( source.getMerchantType() != null ) {
            target.setMerchantType( source.getMerchantType() );
        }
        if ( source.getBankCertName() != null ) {
            target.setBankCertName( source.getBankCertName() );
        }
        if ( target.getParentIdList() != null ) {
            List<String> list1 = source.getParentIdList();
            if ( list1 != null ) {
                target.getParentIdList().clear();
                target.getParentIdList().addAll( list1 );
            }
        }
        else {
            List<String> list1 = source.getParentIdList();
            if ( list1 != null ) {
                target.setParentIdList( new ArrayList<String>( list1 ) );
            }
        }
        if ( source.getAlias() != null ) {
            target.setAlias( source.getAlias() );
        }
        if ( source.getTotalMoney() != null ) {
            target.setTotalMoney( source.getTotalMoney() );
        }
        if ( source.getType() != null ) {
            target.setType( source.getType() );
        }
        if ( source.getRate() != null ) {
            target.setRate( source.getRate() );
        }
        if ( source.getSize() != null ) {
            target.setSize( source.getSize() );
        }
        if ( source.getPage() != null ) {
            target.setPage( source.getPage() );
        }
        if ( source.getMercId() != null ) {
            target.setMercId( source.getMercId() );
        }
        if ( source.getMerchantId() != null ) {
            target.setMerchantId( source.getMerchantId() );
        }
        if ( source.getMerchantAuditStatus() != null ) {
            target.setMerchantAuditStatus( source.getMerchantAuditStatus() );
        }
        if ( source.getMerchantBaseInfo() != null ) {
            target.setMerchantBaseInfo( source.getMerchantBaseInfo() );
        }
        if ( source.getMerchantBankCard() != null ) {
            target.setMerchantBankCard( source.getMerchantBankCard() );
        }
        if ( source.getBankCard() != null ) {
            if ( target.getBankCard() == null ) {
                target.setBankCard( new BankCard() );
            }
            cp( source.getBankCard(), target.getBankCard() );
        }
        if ( source.getIdCard() != null ) {
            if ( target.getIdCard() == null ) {
                target.setIdCard( new IdCard() );
            }
            cp( source.getIdCard(), target.getIdCard() );
        }
        if ( source.getStartDate() != null ) {
            target.setStartDate( source.getStartDate() );
        }
        if ( source.getEndDate() != null ) {
            target.setEndDate( source.getEndDate() );
        }
        if ( source.getThirdStatus() != null ) {
            target.setThirdStatus( source.getThirdStatus() );
        }
        if ( source.getStoreId2() != null ) {
            target.setStoreId2( source.getStoreId2() );
        }
        if ( source.getMcsStatus() != null ) {
            target.setMcsStatus( source.getMcsStatus() );
        }
        if ( source.getRemark() != null ) {
            target.setRemark( source.getRemark() );
        }
        if ( source.getUpdateTime() != null ) {
            target.setUpdateTime( source.getUpdateTime() );
        }
        if ( source.getPpStatus() != null ) {
            target.setPpStatus( source.getPpStatus() );
        }
        if ( source.getPpThirdStatus() != null ) {
            target.setPpThirdStatus( source.getPpThirdStatus() );
        }
        if ( source.getPluginRemark() != null ) {
            target.setPluginRemark( source.getPluginRemark() );
        }
        if ( target.getChannelStatusList() != null ) {
            List<MerchantChannelStatus> list2 = source.getChannelStatusList();
            if ( list2 != null ) {
                target.getChannelStatusList().clear();
                target.getChannelStatusList().addAll( list2 );
            }
        }
        else {
            List<MerchantChannelStatus> list2 = source.getChannelStatusList();
            if ( list2 != null ) {
                target.setChannelStatusList( new ArrayList<MerchantChannelStatus>( list2 ) );
            }
        }
        if ( source.getPayPassword() != null ) {
            target.setPayPassword( source.getPayPassword() );
        }
        if ( source.getPermissionBill() != null ) {
            target.setPermissionBill( source.getPermissionBill() );
        }
        if ( source.getFaceCert() != null ) {
            target.setFaceCert( source.getFaceCert() );
        }
        if ( source.getFaceCompare() != null ) {
            target.setFaceCompare( source.getFaceCompare() );
        }
        if ( source.getSpreadFlag() != null ) {
            target.setSpreadFlag( source.getSpreadFlag() );
        }
        if ( source.getUserNo() != null ) {
            target.setUserNo( source.getUserNo() );
        }
        if ( source.getTypeMark() != null ) {
            target.setTypeMark( source.getTypeMark() );
        }
        if ( source.getAreaMark() != null ) {
            target.setAreaMark( source.getAreaMark() );
        }
        if ( source.getJfShopKey() != null ) {
            target.setJfShopKey( source.getJfShopKey() );
        }
    }

    @Override
    public AccountVO toVO(AccountDTO accountDTO) {
        if ( accountDTO == null ) {
            return null;
        }

        AccountVO accountVO = new AccountVO();

        accountVO.setId( accountDTO.getId() );
        accountVO.setUserId( accountDTO.getUserId() );
        accountVO.setCertificateUrl( accountDTO.getCertificateUrl() );
        accountVO.setSettleType( accountDTO.getSettleType() );
        accountVO.setIdCardId( accountDTO.getIdCardId() );
        accountVO.setBankCardId( accountDTO.getBankCardId() );
        accountVO.setChannelType( accountDTO.getChannelType() );
        accountVO.setCreateTime( accountDTO.getCreateTime() );
        accountVO.setCreateTimeStart( accountDTO.getCreateTimeStart() );
        accountVO.setCreateTimeEnd( accountDTO.getCreateTimeEnd() );
        accountVO.setUpdateTime( accountDTO.getUpdateTime() );
        accountVO.setUpdateTimeStart( accountDTO.getUpdateTimeStart() );
        accountVO.setUpdateTimeEnd( accountDTO.getUpdateTimeEnd() );
        JSONObject jSONObject = accountDTO.getBak();
        if ( jSONObject != null ) {
            accountVO.setBak( new JSONObject( jSONObject ) );
        }
        accountVO.setStatus( accountDTO.getStatus() );
        accountVO.setBankCard( accountDTO.getBankCard() );
        accountVO.setIdcard( accountDTO.getIdcard() );
        accountVO.setMerchantType( accountDTO.getMerchantType() );

        return accountVO;
    }

    @Override
    public DeviceStock toEntity(DeviceStockDTO deviceStockDTO) {
        if ( deviceStockDTO == null ) {
            return null;
        }

        DeviceStock deviceStock = new DeviceStock();

        deviceStock.setId( deviceStockDTO.getId() );
        deviceStock.setSnNo( deviceStockDTO.getSnNo() );
        deviceStock.setDeviceNo( deviceStockDTO.getDeviceNo() );
        deviceStock.setCode( deviceStockDTO.getCode() );
        deviceStock.setOrderNo( deviceStockDTO.getOrderNo() );
        deviceStock.setPrice( deviceStockDTO.getPrice() );
        deviceStock.setType( deviceStockDTO.getType() );
        deviceStock.setGroupNo( deviceStockDTO.getGroupNo() );
        deviceStock.setBuyMercName( deviceStockDTO.getBuyMercName() );
        deviceStock.setBuyMercId( deviceStockDTO.getBuyMercId() );
        deviceStock.setActMercName( deviceStockDTO.getActMercName() );
        deviceStock.setActMercId( deviceStockDTO.getActMercId() );
        deviceStock.setActUserId( deviceStockDTO.getActUserId() );
        deviceStock.setBuyUserId( deviceStockDTO.getBuyUserId() );
        deviceStock.setStatus( deviceStockDTO.getStatus() );
        deviceStock.setCreateTime( deviceStockDTO.getCreateTime() );
        deviceStock.setUpdateTime( deviceStockDTO.getUpdateTime() );
        deviceStock.setCreateTimeStart( deviceStockDTO.getCreateTimeStart() );
        deviceStock.setCreateTimeEnd( deviceStockDTO.getCreateTimeEnd() );
        deviceStock.setCreateBy( deviceStockDTO.getCreateBy() );
        deviceStock.setDelFlag( deviceStockDTO.getDelFlag() );
        deviceStock.setRemarks( deviceStockDTO.getRemarks() );
        deviceStock.setStartSnNo( deviceStockDTO.getStartSnNo() );
        deviceStock.setEndSnNo( deviceStockDTO.getEndSnNo() );
        deviceStock.setBelongUserId( deviceStockDTO.getBelongUserId() );
        deviceStock.setExtractUserId( deviceStockDTO.getExtractUserId() );
        deviceStock.setRoleCode( deviceStockDTO.getRoleCode() );
        deviceStock.setInStockTime( deviceStockDTO.getInStockTime() );
        deviceStock.setTransferStatus( deviceStockDTO.getTransferStatus() );
        deviceStock.setBindTime( deviceStockDTO.getBindTime() );

        return deviceStock;
    }

    @Override
    public BankCard toEntity(BankCardDTO bankCardDTO) {
        if ( bankCardDTO == null ) {
            return null;
        }

        BankCard bankCard = new BankCard();

        bankCard.setId( bankCardDTO.getId() );
        bankCard.setUserId( bankCardDTO.getUserId() );
        bankCard.setBankHolder( bankCardDTO.getBankHolder() );
        bankCard.setBankCardNo( bankCardDTO.getBankCardNo() );
        bankCard.setBankName( bankCardDTO.getBankName() );
        bankCard.setBranchName( bankCardDTO.getBranchName() );
        bankCard.setAccountType( bankCardDTO.getAccountType() );
        bankCard.setContactLine( bankCardDTO.getContactLine() );
        bankCard.setBranchProvince( bankCardDTO.getBranchProvince() );
        bankCard.setBranchCity( bankCardDTO.getBranchCity() );
        bankCard.setBranchArea( bankCardDTO.getBranchArea() );
        bankCard.setBankAddressNo( bankCardDTO.getBankAddressNo() );
        bankCard.setPhone( bankCardDTO.getPhone() );
        bankCard.setCreateTime( bankCardDTO.getCreateTime() );
        bankCard.setCreateTimeStart( bankCardDTO.getCreateTimeStart() );
        bankCard.setCreateTimeEnd( bankCardDTO.getCreateTimeEnd() );
        bankCard.setUpdateTime( bankCardDTO.getUpdateTime() );
        bankCard.setUpdateTimeStart( bankCardDTO.getUpdateTimeStart() );
        bankCard.setUpdateTimeEnd( bankCardDTO.getUpdateTimeEnd() );
        bankCard.setImgUrl( bankCardDTO.getImgUrl() );
        bankCard.setLicenseUrl( bankCardDTO.getLicenseUrl() );

        return bankCard;
    }

    @Override
    public void cp(IpLocationCache source, DescribeIpv4LocationResponse target) {
        if ( source == null ) {
            return;
        }

        if ( source.getIp() != null ) {
            target.setIp( source.getIp() );
        }
        if ( source.getCountry() != null ) {
            target.setCountry( source.getCountry() );
        }
        if ( source.getProvince() != null ) {
            target.setProvince( source.getProvince() );
        }
        if ( source.getCity() != null ) {
            target.setCity( source.getCity() );
        }
        if ( source.getCounty() != null ) {
            target.setCounty( source.getCounty() );
        }
        if ( source.getIsp() != null ) {
            target.setIsp( source.getIsp() );
        }
    }

    @Override
    public void cp(DescribeIpv4LocationResponse source, IpLocationCache target) {
        if ( source == null ) {
            return;
        }

        if ( source.getIp() != null ) {
            target.setIp( source.getIp() );
        }
        if ( source.getIsp() != null ) {
            target.setIsp( source.getIsp() );
        }
        if ( source.getCountry() != null ) {
            target.setCountry( source.getCountry() );
        }
        if ( source.getProvince() != null ) {
            target.setProvince( source.getProvince() );
        }
        if ( source.getCity() != null ) {
            target.setCity( source.getCity() );
        }
        if ( source.getCounty() != null ) {
            target.setCounty( source.getCounty() );
        }
    }

    @Override
    public DeviceStockVO toVO(DeviceStock entity) {
        if ( entity == null ) {
            return null;
        }

        DeviceStockVO deviceStockVO = new DeviceStockVO();

        deviceStockVO.setId( entity.getId() );
        deviceStockVO.setSnNo( entity.getSnNo() );
        deviceStockVO.setDeviceNo( entity.getDeviceNo() );
        deviceStockVO.setCode( entity.getCode() );
        deviceStockVO.setOrderNo( entity.getOrderNo() );
        deviceStockVO.setPrice( entity.getPrice() );
        deviceStockVO.setType( entity.getType() );
        deviceStockVO.setGroupNo( entity.getGroupNo() );
        deviceStockVO.setBuyMercName( entity.getBuyMercName() );
        deviceStockVO.setBuyMercId( entity.getBuyMercId() );
        deviceStockVO.setActMercName( entity.getActMercName() );
        deviceStockVO.setActMercId( entity.getActMercId() );
        deviceStockVO.setActUserId( entity.getActUserId() );
        deviceStockVO.setBuyUserId( entity.getBuyUserId() );
        deviceStockVO.setStatus( entity.getStatus() );
        deviceStockVO.setCreateTime( entity.getCreateTime() );
        deviceStockVO.setUpdateTime( entity.getUpdateTime() );
        deviceStockVO.setCreateTimeStart( entity.getCreateTimeStart() );
        deviceStockVO.setCreateTimeEnd( entity.getCreateTimeEnd() );
        deviceStockVO.setCreateBy( entity.getCreateBy() );
        deviceStockVO.setDelFlag( entity.getDelFlag() );
        deviceStockVO.setRemarks( entity.getRemarks() );
        deviceStockVO.setStartSnNo( entity.getStartSnNo() );
        deviceStockVO.setEndSnNo( entity.getEndSnNo() );
        deviceStockVO.setBelongUserId( entity.getBelongUserId() );
        deviceStockVO.setExtractUserId( entity.getExtractUserId() );
        deviceStockVO.setRoleCode( entity.getRoleCode() );
        deviceStockVO.setInStockTime( entity.getInStockTime() );
        deviceStockVO.setTransferStatus( entity.getTransferStatus() );
        deviceStockVO.setBindTime( entity.getBindTime() );

        return deviceStockVO;
    }

    @Override
    public DeviceDetailVO toVO(DeviceDetail entity) {
        if ( entity == null ) {
            return null;
        }

        DeviceDetailVO deviceDetailVO = new DeviceDetailVO();

        deviceDetailVO.setId( entity.getId() );
        deviceDetailVO.setCode( entity.getCode() );
        deviceDetailVO.setCodeDesc( entity.getCodeDesc() );
        deviceDetailVO.setVenderCode( entity.getVenderCode() );
        deviceDetailVO.setDeviceLogo( entity.getDeviceLogo() );
        deviceDetailVO.setVenderName( entity.getVenderName() );
        deviceDetailVO.setVenderModel( entity.getVenderModel() );
        deviceDetailVO.setAisleModel( entity.getAisleModel() );
        deviceDetailVO.setGroupNo( entity.getGroupNo() );
        deviceDetailVO.setGroupNoDesc( entity.getGroupNoDesc() );
        deviceDetailVO.setIntroDesc( entity.getIntroDesc() );
        deviceDetailVO.setSeq( entity.getSeq() );
        deviceDetailVO.setStatus( entity.getStatus() );
        deviceDetailVO.setCreateDt( entity.getCreateDt() );
        deviceDetailVO.setCreateDtStart( entity.getCreateDtStart() );
        deviceDetailVO.setCreateDtEnd( entity.getCreateDtEnd() );
        deviceDetailVO.setSize( entity.getSize() );
        deviceDetailVO.setWholesalePrice( entity.getWholesalePrice() );
        deviceDetailVO.setWholesaleMinNum( entity.getWholesaleMinNum() );
        deviceDetailVO.setDetail( entity.getDetail() );
        deviceDetailVO.setWeight( entity.getWeight() );
        deviceDetailVO.setUnitPrice( entity.getUnitPrice() );
        deviceDetailVO.setTypeDesc( entity.getTypeDesc() );
        deviceDetailVO.setType( entity.getType() );

        return deviceDetailVO;
    }

    @Override
    public void cp(UserVoice source, UserVoice target) {
        if ( source == null ) {
            return;
        }

        if ( source.getUserId() != null ) {
            target.setUserId( source.getUserId() );
        }
        if ( source.getPaySuccess() != null ) {
            target.setPaySuccess( source.getPaySuccess() );
        }
        if ( source.getPayCancel() != null ) {
            target.setPayCancel( source.getPayCancel() );
        }
        if ( source.getMemberCharge() != null ) {
            target.setMemberCharge( source.getMemberCharge() );
        }
        if ( source.getMemberConsume() != null ) {
            target.setMemberConsume( source.getMemberConsume() );
        }
        if ( source.getDeliveryOrder() != null ) {
            target.setDeliveryOrder( source.getDeliveryOrder() );
        }
        if ( source.getStoreOrder() != null ) {
            target.setStoreOrder( source.getStoreOrder() );
        }
        if ( source.getUrge() != null ) {
            target.setUrge( source.getUrge() );
        }
    }

    @Override
    public void cp(MercTradeDataDTO source, MercTradeDataDTO target) {
        if ( source == null ) {
            return;
        }

        if ( source.getMerchantCode() != null ) {
            target.setMerchantCode( source.getMerchantCode() );
        }
        if ( source.getPhone() != null ) {
            target.setPhone( source.getPhone() );
        }
        if ( source.getUserId() != null ) {
            target.setUserId( source.getUserId() );
        }
        if ( source.getAlias() != null ) {
            target.setAlias( source.getAlias() );
        }
        if ( source.getTradeSumAmt() != null ) {
            target.setTradeSumAmt( source.getTradeSumAmt() );
        }
        if ( source.getTradeSumNum() != null ) {
            target.setTradeSumNum( source.getTradeSumNum() );
        }
        if ( source.getPrevTradeSumAmt() != null ) {
            target.setPrevTradeSumAmt( source.getPrevTradeSumAmt() );
        }
        if ( source.getPrevTradeSumNum() != null ) {
            target.setPrevTradeSumNum( source.getPrevTradeSumNum() );
        }
        if ( source.getAmtChain() != null ) {
            target.setAmtChain( source.getAmtChain() );
        }
        if ( source.getNumChain() != null ) {
            target.setNumChain( source.getNumChain() );
        }
        if ( source.getCondition() != null ) {
            target.setCondition( source.getCondition() );
        }
        if ( source.getStartTime() != null ) {
            target.setStartTime( source.getStartTime() );
        }
        if ( source.getEndTime() != null ) {
            target.setEndTime( source.getEndTime() );
        }
        if ( source.getField() != null ) {
            target.setField( source.getField() );
        }
        if ( source.getOrder() != null ) {
            target.setOrder( source.getOrder() );
        }
        if ( source.getPayEcdemicSwitch() != null ) {
            target.setPayEcdemicSwitch( source.getPayEcdemicSwitch() );
        }
        if ( source.getFollowStatus() != null ) {
            target.setFollowStatus( source.getFollowStatus() );
        }
        if ( source.getStoreId() != null ) {
            target.setStoreId( source.getStoreId() );
        }
    }

    @Override
    public JftReceiptInfoVO toVO(JftReceiptInfo entity) {
        if ( entity == null ) {
            return null;
        }

        JftReceiptInfoVO jftReceiptInfoVO = new JftReceiptInfoVO();

        jftReceiptInfoVO.setId( entity.getId() );
        jftReceiptInfoVO.setProjectName( entity.getProjectName() );
        jftReceiptInfoVO.setAmount( entity.getAmount() );
        jftReceiptInfoVO.setUserId( entity.getUserId() );
        jftReceiptInfoVO.setStatus( entity.getStatus() );
        jftReceiptInfoVO.setCreateTime( entity.getCreateTime() );
        jftReceiptInfoVO.setCreateTimeStart( entity.getCreateTimeStart() );
        jftReceiptInfoVO.setCreateTimeEnd( entity.getCreateTimeEnd() );
        jftReceiptInfoVO.setEndTime( entity.getEndTime() );
        jftReceiptInfoVO.setEndTimeStart( entity.getEndTimeStart() );
        jftReceiptInfoVO.setEndTimeEnd( entity.getEndTimeEnd() );
        jftReceiptInfoVO.setToken( entity.getToken() );
        List<Long> list = entity.getPaymentIds();
        if ( list != null ) {
            jftReceiptInfoVO.setPaymentIds( new ArrayList<Long>( list ) );
        }
        jftReceiptInfoVO.setStartDate( entity.getStartDate() );
        jftReceiptInfoVO.setEndDate( entity.getEndDate() );
        jftReceiptInfoVO.setQrCodeUrl( entity.getQrCodeUrl() );
        jftReceiptInfoVO.setImageUrl( entity.getImageUrl() );
        jftReceiptInfoVO.setIp( entity.getIp() );
        jftReceiptInfoVO.setJumpUrl( entity.getJumpUrl() );
        jftReceiptInfoVO.setJftRate( entity.getJftRate() );
        jftReceiptInfoVO.setJftMerc( toVO( entity.getJftMerc() ) );
        jftReceiptInfoVO.setJftChannel( toVO( entity.getJftChannel() ) );

        return jftReceiptInfoVO;
    }

    @Override
    public JftBankCard toJftData(BankCard bankCard) {
        if ( bankCard == null ) {
            return null;
        }

        JftBankCard jftBankCard = new JftBankCard();

        if ( bankCard.getUserId() != null ) {
            jftBankCard.setUserId( Long.parseLong( bankCard.getUserId() ) );
        }
        jftBankCard.setBankHolder( bankCard.getBankHolder() );
        jftBankCard.setBankCardNo( bankCard.getBankCardNo() );
        jftBankCard.setBankName( bankCard.getBankName() );
        jftBankCard.setBranchName( bankCard.getBranchName() );
        jftBankCard.setContactLine( bankCard.getContactLine() );
        jftBankCard.setBranchProvince( bankCard.getBranchProvince() );
        jftBankCard.setBranchCity( bankCard.getBranchCity() );
        jftBankCard.setBranchArea( bankCard.getBranchArea() );
        jftBankCard.setPhone( bankCard.getPhone() );
        jftBankCard.setImgUrl( bankCard.getImgUrl() );
        jftBankCard.setCreateTime( bankCard.getCreateTime() );
        jftBankCard.setUpdateTime( bankCard.getUpdateTime() );

        return jftBankCard;
    }

    @Override
    public JftMerchantRateRecord toRecord(JftMerchantRate entity) {
        if ( entity == null ) {
            return null;
        }

        JftMerchantRateRecord jftMerchantRateRecord = new JftMerchantRateRecord();

        jftMerchantRateRecord.setChannel( entity.getChannel() );
        jftMerchantRateRecord.setMerchantId( entity.getMerchantId() );
        if ( entity.getAliRate() != null ) {
            jftMerchantRateRecord.setAliRate( entity.getAliRate().intValue() );
        }
        jftMerchantRateRecord.setCreateTime( entity.getCreateTime() );
        jftMerchantRateRecord.setCreateTimeStart( entity.getCreateTimeStart() );
        jftMerchantRateRecord.setCreateTimeEnd( entity.getCreateTimeEnd() );
        jftMerchantRateRecord.setUpdateTime( entity.getUpdateTime() );
        jftMerchantRateRecord.setUpdateTimeStart( entity.getUpdateTimeStart() );
        jftMerchantRateRecord.setUpdateTimeEnd( entity.getUpdateTimeEnd() );

        return jftMerchantRateRecord;
    }

    @Override
    public void cp(JftMerchantRateRecord source, JftMerchantRate target) {
        if ( source == null ) {
            return;
        }

        if ( source.getChannel() != null ) {
            target.setChannel( source.getChannel() );
        }
        if ( source.getMerchantId() != null ) {
            target.setMerchantId( source.getMerchantId() );
        }
        if ( source.getAliRate() != null ) {
            target.setAliRate( BigDecimal.valueOf( source.getAliRate() ) );
        }
        if ( source.getCreateTimeStart() != null ) {
            target.setCreateTimeStart( source.getCreateTimeStart() );
        }
        if ( source.getCreateTimeEnd() != null ) {
            target.setCreateTimeEnd( source.getCreateTimeEnd() );
        }
        if ( source.getUpdateTimeStart() != null ) {
            target.setUpdateTimeStart( source.getUpdateTimeStart() );
        }
        if ( source.getUpdateTimeEnd() != null ) {
            target.setUpdateTimeEnd( source.getUpdateTimeEnd() );
        }
    }

    @Override
    public MercMemberSetVO toVO(MercMemberSet mercMemberSet) {
        if ( mercMemberSet == null ) {
            return null;
        }

        MercMemberSetVO mercMemberSetVO = new MercMemberSetVO();

        mercMemberSetVO.setUserId( mercMemberSet.getUserId() );
        mercMemberSetVO.setStatus( mercMemberSet.getStatus() );
        mercMemberSetVO.setScope( mercMemberSet.getScope() );
        mercMemberSetVO.setCreateTime( mercMemberSet.getCreateTime() );
        mercMemberSetVO.setUpdateTime( mercMemberSet.getUpdateTime() );

        return mercMemberSetVO;
    }

    @Override
    public JftMercBaseInfoVO toVO(JftMercBaseInfo jftMercBaseInfo) {
        if ( jftMercBaseInfo == null ) {
            return null;
        }

        JftMercBaseInfoVO jftMercBaseInfoVO = new JftMercBaseInfoVO();

        jftMercBaseInfoVO.setAutoFlag( jftMercBaseInfo.getAutoFlag() );
        jftMercBaseInfoVO.setUserId( jftMercBaseInfo.getUserId() );
        jftMercBaseInfoVO.setMerchantCode( jftMercBaseInfo.getMerchantCode() );
        jftMercBaseInfoVO.setMerchantName( jftMercBaseInfo.getMerchantName() );
        jftMercBaseInfoVO.setMerchantType( jftMercBaseInfo.getMerchantType() );
        jftMercBaseInfoVO.setMcc( jftMercBaseInfo.getMcc() );
        jftMercBaseInfoVO.setMccName( jftMercBaseInfo.getMccName() );
        jftMercBaseInfoVO.setAlias( jftMercBaseInfo.getAlias() );
        jftMercBaseInfoVO.setAddressNo( jftMercBaseInfo.getAddressNo() );
        jftMercBaseInfoVO.setProvince( jftMercBaseInfo.getProvince() );
        jftMercBaseInfoVO.setCity( jftMercBaseInfo.getCity() );
        jftMercBaseInfoVO.setDistrict( jftMercBaseInfo.getDistrict() );
        jftMercBaseInfoVO.setAddress( jftMercBaseInfo.getAddress() );
        jftMercBaseInfoVO.setPrincipalPerson( jftMercBaseInfo.getPrincipalPerson() );
        jftMercBaseInfoVO.setBussAuthName( jftMercBaseInfo.getBussAuthName() );
        jftMercBaseInfoVO.setBussAuthNum( jftMercBaseInfo.getBussAuthNum() );
        jftMercBaseInfoVO.setBussAuthAddress( jftMercBaseInfo.getBussAuthAddress() );
        jftMercBaseInfoVO.setBussAuthStartTime( jftMercBaseInfo.getBussAuthStartTime() );
        jftMercBaseInfoVO.setBussAuthEndTime( jftMercBaseInfo.getBussAuthEndTime() );
        jftMercBaseInfoVO.setCreateTime( jftMercBaseInfo.getCreateTime() );
        jftMercBaseInfoVO.setCreateTimeStart( jftMercBaseInfo.getCreateTimeStart() );
        jftMercBaseInfoVO.setCreateTimeEnd( jftMercBaseInfo.getCreateTimeEnd() );
        jftMercBaseInfoVO.setUpdateTime( jftMercBaseInfo.getUpdateTime() );
        jftMercBaseInfoVO.setUpdateTimeStart( jftMercBaseInfo.getUpdateTimeStart() );
        jftMercBaseInfoVO.setUpdateTimeEnd( jftMercBaseInfo.getUpdateTimeEnd() );
        jftMercBaseInfoVO.setBuslicType( jftMercBaseInfo.getBuslicType() );
        jftMercBaseInfoVO.setFrontPic( jftMercBaseInfo.getFrontPic() );
        jftMercBaseInfoVO.setCashDesk( jftMercBaseInfo.getCashDesk() );
        jftMercBaseInfoVO.setInterior( jftMercBaseInfo.getInterior() );
        jftMercBaseInfoVO.setNotifyUrl( jftMercBaseInfo.getNotifyUrl() );

        return jftMercBaseInfoVO;
    }

    @Override
    public JftMercPaymentChannelVO toVO(JftMercPaymentChannel jftMercPaymentChannel) {
        if ( jftMercPaymentChannel == null ) {
            return null;
        }

        JftMercPaymentChannelVO jftMercPaymentChannelVO = new JftMercPaymentChannelVO();

        jftMercPaymentChannelVO.setUserId( jftMercPaymentChannel.getUserId() );
        jftMercPaymentChannelVO.setMerchantCode( jftMercPaymentChannel.getMerchantCode() );
        jftMercPaymentChannelVO.setMerchantId( jftMercPaymentChannel.getMerchantId() );
        jftMercPaymentChannelVO.setStatus( jftMercPaymentChannel.getStatus() );
        jftMercPaymentChannelVO.setStatusDesc( jftMercPaymentChannel.getStatusDesc() );
        jftMercPaymentChannelVO.setThirdStatus( jftMercPaymentChannel.getThirdStatus() );
        jftMercPaymentChannelVO.setRemark( jftMercPaymentChannel.getRemark() );
        jftMercPaymentChannelVO.setCreateTime( jftMercPaymentChannel.getCreateTime() );
        jftMercPaymentChannelVO.setCreateTimeStart( jftMercPaymentChannel.getCreateTimeStart() );
        jftMercPaymentChannelVO.setCreateTimeEnd( jftMercPaymentChannel.getCreateTimeEnd() );
        jftMercPaymentChannelVO.setPassTime( jftMercPaymentChannel.getPassTime() );
        jftMercPaymentChannelVO.setPassTimeStart( jftMercPaymentChannel.getPassTimeStart() );
        jftMercPaymentChannelVO.setPassTimeEnd( jftMercPaymentChannel.getPassTimeEnd() );
        jftMercPaymentChannelVO.setUpdateTime( jftMercPaymentChannel.getUpdateTime() );
        jftMercPaymentChannelVO.setUpdateTimeStart( jftMercPaymentChannel.getUpdateTimeStart() );
        jftMercPaymentChannelVO.setUpdateTimeEnd( jftMercPaymentChannel.getUpdateTimeEnd() );
        jftMercPaymentChannelVO.setApplicationId( jftMercPaymentChannel.getApplicationId() );
        JSONObject jSONObject = jftMercPaymentChannel.getExtra();
        if ( jSONObject != null ) {
            jftMercPaymentChannelVO.setExtra( new JSONObject( jSONObject ) );
        }
        jftMercPaymentChannelVO.setMercName( jftMercPaymentChannel.getMercName() );

        return jftMercPaymentChannelVO;
    }
}
