package cn.freemud.manager;

import cn.freemud.entities.db.OpenPlatformPaymentConfig;
import cn.freemud.manager.dao.OpenPlatformPaymentConfigDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 支付配置表manager
 * @author zhenghuan.yang
 * @date 2019/03/29
 */
@Component
public class OpenPlatformPaymentConfigManager {

    @Autowired
    private OpenPlatformPaymentConfigDao openPlatformPaymentConfigDao;

    public OpenPlatformPaymentConfig selectPaymentConfigByWxAppId(String wxAppId) {
        OpenPlatformPaymentConfig config = new OpenPlatformPaymentConfig();
        config.setWxAppId(wxAppId);
        return openPlatformPaymentConfigDao.selectOne(config);
    }
    public int insert(OpenPlatformPaymentConfig config) {
        return openPlatformPaymentConfigDao.insert(config);
    }

}
