package com.fs.tzBank.utils;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.extra.spring.SpringUtil;
import com.fs.common.utils.spring.SpringUtils;
import com.fs.store.domain.TzConfigInfoDTO;
import com.fs.system.domain.SysConfig;
import com.fs.system.mapper.SysConfigMapper;
import com.google.gson.Gson;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 台州银行配置获取
 */
public class TzConfigUtils {

    public static TzConfigInfoDTO getConfig(){

        SysConfigMapper sysConfigMapper = SpringUtils.getBean(SysConfigMapper.class);
        SysConfig sysConfig = sysConfigMapper.selectConfigByConfigKey("store.pay");
        return new Gson().fromJson(sysConfig.getConfigValue(), TzConfigInfoDTO.class);
    }
}
