package com.jwipc.job.logic.impl;


import com.jwipc.api.ThirdPartySystemAccountLogic;
import com.jwipc.api.dto.ThirdPartySystemAccountDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;


/**
 * <p> </p>
 *
 * @author BOGON
 * @version 1.0
 * @since JDK 1.8
 */
@Service
@RequiredArgsConstructor
public class ThirdPartySystemAccountLogicImpl implements ThirdPartySystemAccountLogic {
    // TODO: 2024/3/20 目前提供两个，一个是sap一个是oa jiez

    @Override
    public ThirdPartySystemAccountDTO getByUserName(String value) {
        final ThirdPartySystemAccountDTO thirdPartySystemAccountDTO = new ThirdPartySystemAccountDTO();
        if (value.equals("srm")) {
            thirdPartySystemAccountDTO.setUserName("srm");
            thirdPartySystemAccountDTO.setPassword("JWIPC@2024!jwipc");
            return thirdPartySystemAccountDTO;
        } else if (value.equals("OA2SRM")) {
            thirdPartySystemAccountDTO.setUserName("OA2SRM");
            thirdPartySystemAccountDTO.setPassword("SRM12345!");
            return thirdPartySystemAccountDTO;
        }
        return null;
    }
}