package cn.freemud.manager;

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


/**
 * All rights Reserved, Designed By www.freemud.cn
 *
 * @version V1.0
 * @Title: OpenPlatformIappWxappStoreManager
 * @Package cn.freemud.manager
 * @Description: 简单描述下这个类是做什么用的
 * @author: zhenghuan.yang
 * @date: 2018/9/6 13:23
 * @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
 * 注意：本内容仅限于上海非码科技内部传阅，禁止外泄以及用于其他的商业目
 */
@Component
public class OpenPlatformIappWxappConfigManager {

    @Autowired
    private OpenPlatformIappWxappConfigDao openPlatformIappWxappConfigDao;
    public OpenPlatformIappWxappConfig selectIappWxappConfigByWxAppId(String wxAppId) {
        OpenPlatformIappWxappConfig openPlatformIappWxappConfig=new OpenPlatformIappWxappConfig();
        openPlatformIappWxappConfig.setWxAppid(wxAppId);
        return openPlatformIappWxappConfigDao.selectOne(openPlatformIappWxappConfig);
    }
    public int insert(OpenPlatformIappWxappConfig openPlatformIappWxappConfig) {
        return openPlatformIappWxappConfigDao.insert(openPlatformIappWxappConfig);
    }
    public int update(OpenPlatformIappWxappConfig openPlatformIappWxappConfig){
        return openPlatformIappWxappConfigDao.updateByPrimaryKeySelective(openPlatformIappWxappConfig);
    }
}
