package com.nbclass.activity.service.impl;

import com.nbclass.activity.mapper.WXMapper;
import com.nbclass.activity.model.WeiXiUser;
import com.nbclass.activity.service.WxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class WxServiceImpl implements WxService {

    @Autowired
    private WXMapper wxMapper;


    @Override
    public int getOpenId(String openid) {
        return wxMapper.getOpenId(openid);
    }

    @Override
    public void saveWxUser(WeiXiUser weiXiUser) {
        wxMapper.saveWxUser(weiXiUser);
    }

    @Override
    public WeiXiUser getWxUser(String openid) {
        return wxMapper.getWxUser(openid);
    }

    @Override
    public WeiXiUser getUser(String userId) {
        return wxMapper.getUser(userId);
    }

    @Override
    public void updateBasicData(WeiXiUser weiXiUser) {
        wxMapper.updateBasicData(weiXiUser);
    }

    @Override
    public WeiXiUser getUserBasicData(Long userId) {
        return wxMapper.getUserBasicData(userId);
    }

}
