package cn.exploring.engine.server.db.service;

import cn.exploring.engine.server.db.dao.WxUserMapper;
import cn.exploring.engine.server.db.domain.WxUser;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Liu_c
 */
@Service
public class WxUserInfoService {

    @Resource
    private WxUserMapper wxUserMapper;

    public Map getUserInfo(Integer userId) {
        WxUser wxUser = wxUserMapper.selectByPrimaryKey(userId);
        return new HashMap() {{
            put("nickname", wxUser.getNickname());
            put("avatar", wxUser.getAvatar());
        }};

    }

}
