package com.pcloud.book.group.dao.impl;

import com.pcloud.book.group.dao.WxWechatUserCorrelationDao;
import com.pcloud.book.group.entity.WxWechatUserCorrelation;
import com.pcloud.common.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description
 * @Author ruansiyuan
 * @Date 2019/12/31 17:06
 **/
@Component("wxWechatUserCorrelationDao")
public class WxWechatUserCorrelationDaoImpl extends BaseDaoImpl<WxWechatUserCorrelation> implements WxWechatUserCorrelationDao {
    @Override
    public WxWechatUserCorrelation getByWxIdAndBookGroupId(Long bookGroupId, String wxId) {
        Map<String,Object> map=new HashMap<>();
        map.put("bookGroupId",bookGroupId);
        map.put("wxId",wxId);
        return this.getSqlSession().selectOne(getStatement("getByWxIdAndBookGroupId"),map);
    }
}
