package cn.iselab.mooctest.user.service.impl;

import cn.iselab.mooctest.user.mapper.UserWechatMapper;
import cn.iselab.mooctest.user.model.UserWechat;
import cn.iselab.mooctest.user.service.WechatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author ROKG
 * @Description
 * @Date: Created in 上午11:15 2018/4/17
 * @Modified By:
 */
@Service
public class WechatServiceImpl implements WechatService {

    @Autowired
    UserWechatMapper wechatMapper;

    @Override
    public UserWechat findByOpenId(String openId){
        return wechatMapper.findByOpenId(openId);
    }

    @Override
    public UserWechat findByUnionId(String unionId){
        return wechatMapper.findByUnionId(unionId);
    }

    @Override
    public UserWechat findByUserId(Long userId){
        return wechatMapper.findByUserId(userId);
    }

    @Override
    public void save(UserWechat wechat){
        wechatMapper.save(wechat);
    }

    @Override
    public void update(UserWechat wechat){
        wechatMapper.update(wechat);
    }
}
